import { createAPI } from '@/utils/request'

export const articlesList = data => createAPI('/articles', 'get', data)
export const articleDetails = id => createAPI(`/articles/${id}`, 'get')
export const articleStatus = (id, state) => createAPI(`/articles/${id}/${state}`, 'POST')
export const articleAdd = data => createAPI('/articles', 'POST', data)
export const articleput = data => createAPI(`/articles/${data.id}`, 'PUT', data)
export const articleDelete = id => createAPI(`/articles/${id}`, 'DELETE')
